function Rectangle(name, width, height) {
  this.name = name;
  this.width = width;
  this.height = height;
  this.area = function () {
    return this.width * this.height;
  };
}

const rect = new Rectangle("矩形 1", 20, 20);
console.log(rect);

console.log(rect.__proto__);
// 输出：{ constructor: [Function: Rectangle] }

console.log(rect.__proto__.constructor);
// 输出：[Function: Rectangle]

console.log(rect.toString());
// 输出：[object Object]

const arr = [];
console.log(arr.__proto__);
// 输出：Array.prototype

const str = new String("Hello");
console.log(str.__proto__);
// 输出：String.prototype

const obj = {};
console.log(obj.__proto__);
// 输出：Object.prototype

console.log(Object.getPrototypeOf(rect));
// 输出：{ constructor: [Function: Rectangle] }